//转义--
window.html_encode = function (html) {
    if (typeof (html) == 'string') {
        return html.replace(/[<>&"]/g, function (c) { return { '<': '&lt;', '>': '&gt;', '&': '&amp;', '"': '&quot;' }[c]; });
    } else {
        return html;
    }
}
//反转义
window.html_decode = function (text) {
    var temp = document.createElement("div");
    temp.innerHTML = text;
    var output = temp.innerText || temp.textContent;
    temp = null;
    return output;
}